package com.treetao.union.mall.api.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.treetao.union.db.model.vo.RestResponse;
import com.treetao.union.db.service.CommonArticleService;
import com.treetao.union.mall.api.base.BaseCURDController;
import com.treetao.union.mall.api.vo.req.ReqParam;

/**
 * 站内文章
 * 
 * @author devm
 *
 */
@RestController
@RequestMapping("/mall/article")
public class MallArticleController extends BaseCURDController {

	@Autowired
	private CommonArticleService articleService;

	@Override
	protected IService<?> getCommonService() {
		return articleService;
	}

	// 列表查询 条件
	@Override
	protected void commonListWhere(QueryWrapper<?> q, ReqParam param) {
		q.eq("del_flag", false).select("id","title");
	}

}
